package com.typhoon.motan;

import java.util.concurrent.CountDownLatch;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;


public class ProviderServer {
	public static void main(String[] args) throws Exception {
		AbstractApplicationContext context = new ClassPathXmlApplicationContext("spring-root.xml");
		context.start();
		MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
		System.out.println("server start ···");
		CountDownLatch count = new CountDownLatch(1);
		count.await();
		context.close();
	}
}
